import request from '@/utils/request'

// 查询广告管理列表
export function listAdvertising(query) {
  return request({
    url: '/system/advertising/list',
    method: 'get',
    params: query
  })
}

// 查询广告管理详细
export function getAdvertising(advertisingId) {
  return request({
    url: '/system/advertising/' + advertisingId,
    method: 'get'
  })
}

// 新增广告管理
export function addAdvertising(data) {
  return request({
    url: '/system/advertising',
    method: 'post',
    data: data
  })
}
// 上传广告图片
export function uploadImgs(data) {
  return request({
    url: '/system/advertising/uploadImgs',
    method: 'post',
    data: data
  })
}

// 修改广告管理
export function updateAdvertising(data) {
  return request({
    url: '/system/advertising',
    method: 'put',
    data: data
  })
}

// 删除广告管理
export function delAdvertising(advertisingId) {
  return request({
    url: '/system/advertising/' + advertisingId,
    method: 'delete'
  })
}

// 导出广告管理
export function exportAdvertising(query) {
  return request({
    url: '/system/advertising/export',
    method: 'get',
    params: query
  })
}